1 // Fig. 11.25: fig11_25.cpp 2 // Using the ios::showbase flag 3 #include 4 #include 5 6 int main() 7 { 8 int x = 100; 9 10 cout << setiosflags( ios::showbase ) 11 << "Printing integers preceded by their base:\n" 12 << x << '\n' 13 << oct << x << '\n' 14 << hex << x << endl; 15 return 0; 16 }